<div class="layui-body">
	<div class="aright">
		<span class="layui-breadcrumb">
		  <a href="{:url('man/index/index')}">首页</a>
		  <a href="{:url('man/article/index')}">题目管理</a>
		  <a href="{:url('man/article/item',['nid'=>$nid,'nceng'=>1])}">选项列表</a>
		  <a><cite>选项关联</cite></a>
		</span>
	<div class="arz cl"><a><i class="layui-icon">&#xe608;</i>选项关联</a></div>
	<form method="post" class="aform cl" >

	<table width="100%">
	   
	      {volist name="item" id="vo" key="k"}
		  <tr>
		  	<td align="left" colspan="2">【{$k}】{$vo.iname}</td></tr>
			 
			{volist name="vo.couser" id="v"}
	        
				<tr border=0><td align="left" width="10%">{$v.iname}</td><td align="left"><input type="hidden" name="nid" value="{$v.id}"> <input id="num" class="layui-input" type="text" value="{$v.inextnum}"></td></tr>
	    
	      {/volist}
	      </tr>
	      
	      {/volist}
	 </table>

	  </form>
	 		<div class="pages">
 				 
	 	 	</div>
	</div>
	</div>
</div>
<script>
layui.use('layer',function(){
	var layer = layui.layer;
})
$(document).ready(function(){
	
	$(".layui-input").change(function(){
		var nid=$(this).parent().find("input[name='nid']").val();
		var nextnum=$(this).val();

		$.post("{:url('man/article/ajaxitem')}",{'nid':nid,'num':nextnum},function(data){
			if(data){
				layer.msg("修改成功");
			}
		});
	});
});

</script>